package com.wanho.qz103.hrsaas.sys.dao;

import com.wanho.qz103.hrsaas.commons.dao.BaseDAO;
import com.wanho.qz103.hrsaas.commons.exception.DAOException;
import com.wanho.qz103.hrsaas.sys.pojos.Role;

import java.util.List;

/**
 * 对 sys_role 表 基本操作
 */
public interface RoleDAO extends BaseDAO<Role> {
    /**
     * 根据 角色id 删除关系表数据
     * @param roleId
     * @return
     * @throws DAOException
     */
    boolean deleteRolePermissionRef(String roleId) throws DAOException ;


    //boolean insertBatchRolePermissionRef(String roleId,List<String> permIds) throws DAOException ;

    /**
     * 批量新增关系表
     * @param role
     * @return
     * @throws DAOException
     */
    boolean insertBatchRolePermissionRef(Role role) throws DAOException ;

    /**
     * 根据 用户id 查询角色列表
     * @param userId
     * @return
     * @throws DAOException
     */
    List<Role> selectByUserId(String userId) throws DAOException ;
}
